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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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