class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.q: D = None
        self.x: D = None
        self.v: B = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.o: F = None
        self.v: D = None
        self.r: D = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.o: F = None
        self.v: D = None
        self.r: D = None
        self.w: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.p: D = None
        self.txt = txt

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

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