class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: E = None
        self.o: E = None
        self.y: E = None
        self.r: C = None
        self.s: B = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: D = None
        self.txt = txt

b = A("b")
k = B("k")
l = C("l")
e = D("e")
c = E("c")
j = F("j")
h = G("h")

b.q = k
b.s = k
b.z = c
b.o = c
b.y = c
b.t = c
b.r = l
k.o = h
k.w = h
k.v = h
k.r = l
k.y = l
k.p = b
l.p = e
l.w = k
e.w = l
c.s = j
j.t = l
j.o = e
j.w = e
j.x = k
h.r = c
h.u = e
assert j.x.v.r.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: E = None
        self.o: E = None
        self.y: E = None
        self.r: C = None
        self.s: B = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: D = None
        self.txt = txt

b = A("b")
k = B("k")
l = C("l")
e = D("e")
c = E("c")
j = F("j")
h = G("h")

b.q = k
b.s = k
b.z = c
b.o = c
b.y = c
b.t = c
b.r = l
k.o = h
k.w = h
k.v = h
k.r = l
k.y = l
k.p = b
l.p = e
l.w = k
e.w = l
c.s = j
j.t = l
j.o = e
j.w = e
j.x = k
h.r = c
h.u = e
assert j.x.v.r.s.t.txt == "l"