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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.o: A = None
        self.w: D = None
        self.z: G = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: E = None
        self.u: E = None
        self.q: D = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

f.v = e
f.t = l
g.q = h
g.s = h
g.u = k
g.v = k
g.o = f
g.w = l
g.z = b
k.w = f
k.x = b
l.o = g
l.t = h
l.u = h
l.p = h
l.q = c
h.p = b
d.r = g
b.t = c
b.z = k
b.v = d
c.o = g
c.t = h
c.u = h
c.p = h
c.q = l
e.r = g
assert d.r.u.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.o: A = None
        self.w: D = None
        self.z: G = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: E = None
        self.u: E = None
        self.q: D = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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