class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.z: C = None
        self.x: D = None
        self.q: F = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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