class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: C = None
        self.s: B = None
        self.o: F = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: E = None
        self.p: A = None
        self.x: D = None
        self.v: E = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: A = None
        self.y: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: B = None
        self.t: D = None
        self.v: F = None
        self.txt = txt

f = A("f")
n = B("n")
l = C("l")
j = D("j")
i = E("i")
a = F("a")
e = G("e")
m = B("m")
h = F("h")
b = B("b")

f.u = l
n.v = f
n.y = l
n.s = b
n.o = a
n.r = e
l.o = n
l.s = i
l.v = i
l.p = f
l.x = j
l.u = h
l.y = e
j.x = i
j.u = f
j.w = f
j.y = l
i.v = a
i.z = e
a.s = i
e.u = f
e.w = n
e.t = j
e.v = a
m.v = f
m.y = l
m.s = n
m.o = a
m.r = e
h.s = i
b.v = f
b.y = l
b.s = n
b.o = a
b.r = e
assert l.u.s.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: C = None
        self.s: B = None
        self.o: F = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: E = None
        self.p: A = None
        self.x: D = None
        self.v: E = None
        self.u: F = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: A = None
        self.y: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: B = None
        self.t: D = None
        self.v: F = None
        self.txt = txt

f = A("f")
n = B("n")
l = C("l")
j = D("j")
i = E("i")
a = F("a")
e = G("e")
m = B("m")
h = F("h")
b = B("b")

f.u = l
n.v = f
n.y = l
n.s = b
n.o = a
n.r = e
l.o = n
l.s = i
l.v = i
l.p = f
l.x = j
l.u = h
l.y = e
j.x = i
j.u = f
j.w = f
j.y = l
i.v = a
i.z = e
a.s = i
e.u = f
e.w = n
e.t = j
e.v = a
m.v = f
m.y = l
m.s = n
m.o = a
m.r = e
h.s = i
b.v = f
b.y = l
b.s = n
b.o = a
b.r = e
assert l.u.s.v.s.txt == "i"