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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: G = None
        self.y: F = None
        self.w: C = None
        self.z: B = None
        self.t: G = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: A = None
        self.w: F = None
        self.txt = txt

f = A("f")
d = B("d")
a = C("a")
b = D("b")
k = E("k")
c = F("c")
l = G("l")
g = F("g")

f.x = a
f.z = k
f.t = d
d.u = a
a.z = d
b.p = d
b.z = d
b.s = l
b.t = l
b.y = c
b.w = a
b.x = a
k.u = f
k.w = f
k.x = g
k.t = a
c.t = l
l.z = f
l.r = f
l.w = c
g.t = l
assert l.r.x.z.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: G = None
        self.y: F = None
        self.w: C = None
        self.z: B = None
        self.t: G = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: A = None
        self.w: F = None
        self.txt = txt

f = A("f")
d = B("d")
a = C("a")
b = D("b")
k = E("k")
c = F("c")
l = G("l")
g = F("g")

f.x = a
f.z = k
f.t = d
d.u = a
a.z = d
b.p = d
b.z = d
b.s = l
b.t = l
b.y = c
b.w = a
b.x = a
k.u = f
k.w = f
k.x = g
k.t = a
c.t = l
l.z = f
l.r = f
l.w = c
g.t = l
assert l.r.x.z.u.txt == "a"