class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.w: B = None
        self.p: E = None
        self.r: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

j = A("j")
k = B("k")
f = C("f")
e = D("e")
g = E("g")
m = F("m")
n = F("n")
b = E("b")

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

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

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

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

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

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

j = A("j")
k = B("k")
f = C("f")
e = D("e")
g = E("g")
m = F("m")
n = F("n")
b = E("b")

j.x = n
j.s = n
j.w = k
j.p = b
j.v = b
j.r = e
k.o = j
k.r = n
k.v = m
f.r = n
f.s = k
f.t = e
f.q = g
e.u = j
e.v = j
e.y = j
g.o = k
g.q = k
m.s = e
m.z = e
m.v = n
m.t = b
n.s = e
n.z = e
n.v = m
n.t = g
b.o = k
b.q = k
assert f.t.v.x.t.txt == "g"