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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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

b = A("b")
f = B("f")
c = C("c")
a = D("a")
h = E("h")
d = F("d")
e = D("e")
j = F("j")
n = A("n")
i = D("i")

b.t = n
b.r = n
b.z = f
b.v = h
f.r = n
f.s = b
f.o = h
c.z = i
c.r = i
c.y = h
c.v = j
a.v = n
a.p = j
h.w = j
h.t = d
h.x = d
h.v = b
h.r = f
h.s = e
d.w = a
e.v = n
e.p = d
j.w = a
n.t = b
n.r = b
n.z = f
n.v = h
i.v = n
i.p = j
assert f.s.t.t.z.o.x.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: A = None
        self.z: B = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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

b = A("b")
f = B("f")
c = C("c")
a = D("a")
h = E("h")
d = F("d")
e = D("e")
j = F("j")
n = A("n")
i = D("i")

b.t = n
b.r = n
b.z = f
b.v = h
f.r = n
f.s = b
f.o = h
c.z = i
c.r = i
c.y = h
c.v = j
a.v = n
a.p = j
h.w = j
h.t = d
h.x = d
h.v = b
h.r = f
h.s = e
d.w = a
e.v = n
e.p = d
j.w = a
n.t = b
n.r = b
n.z = f
n.v = h
i.v = n
i.p = j
assert f.s.t.t.z.o.x.w.p.txt == "j"