class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.p: C = None
        self.w: D = None
        self.x: C = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: A = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: E = None
        self.y: C = None
        self.p: C = None
        self.u: A = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: A = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: E = None
        self.y: C = None
        self.p: C = None
        self.u: A = None
        self.z: A = None
        self.txt = txt

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

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

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