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

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

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

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

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

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

e = A("e")
i = B("i")
a = C("a")
d = D("d")
m = E("m")
j = F("j")

e.z = m
i.w = a
i.z = j
i.t = d
i.q = d
a.v = i
a.y = d
a.w = d
a.t = e
d.v = i
d.p = i
d.w = j
d.q = m
m.q = i
m.w = i
m.s = i
m.o = d
m.t = j
m.v = e
j.w = d
j.x = d
j.t = i
j.u = i
j.p = m
assert j.w.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

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

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

e = A("e")
i = B("i")
a = C("a")
d = D("d")
m = E("m")
j = F("j")

e.z = m
i.w = a
i.z = j
i.t = d
i.q = d
a.v = i
a.y = d
a.w = d
a.t = e
d.v = i
d.p = i
d.w = j
d.q = m
m.q = i
m.w = i
m.s = i
m.o = d
m.t = j
m.v = e
j.w = d
j.x = d
j.t = i
j.u = i
j.p = m
assert j.w.p.t.txt == "d"