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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.v: B = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: A = None
        self.y: A = None
        self.z: A = None
        self.s: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.txt = txt

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

l = A("l")
e = B("e")
j = C("j")
b = D("b")
a = E("a")
i = F("i")
c = G("c")
d = A("d")

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.v: B = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: A = None
        self.y: A = None
        self.z: A = None
        self.s: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.txt = txt

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

l = A("l")
e = B("e")
j = C("j")
b = D("b")
a = E("a")
i = F("i")
c = G("c")
d = A("d")

l.u = j
e.x = c
e.t = l
j.s = c
j.x = a
j.z = i
j.u = d
b.z = a
b.w = e
b.v = e
b.y = e
a.o = l
a.p = l
a.y = d
a.z = d
a.s = i
a.v = j
i.p = a
i.u = d
c.u = j
d.u = j
assert b.w.x.u.u.u.txt == "j"