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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: E = None
        self.w: F = None
        self.v: B = None
        self.p: D = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: E = None
        self.w: F = None
        self.v: B = None
        self.p: D = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

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

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

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

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