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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.q: C = None
        self.t: A = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.q: C = None
        self.t: A = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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