class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: F = None
        self.x: D = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.z: F = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: D = None
        self.q: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: B = None
        self.p: E = None
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.z: F = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: D = None
        self.q: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: B = None
        self.p: E = None
        self.t: E = None
        self.txt = txt

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

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