class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.v: B = None
        self.r: E = None
        self.x: C = None
        self.q: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

d = A("d")
e = B("e")
h = C("h")
i = D("i")
g = E("g")
j = F("j")
m = D("m")
f = D("f")
n = A("n")

d.t = j
d.o = e
d.v = e
d.r = g
d.x = h
d.q = h
e.q = h
e.u = j
e.v = d
e.z = d
e.t = g
h.z = g
h.o = g
h.p = g
h.x = d
i.t = f
i.y = h
i.p = j
i.r = j
g.q = h
j.v = g
m.t = i
m.y = h
m.p = j
m.r = j
f.t = m
f.y = h
f.p = j
f.r = j
n.t = j
n.o = e
n.v = e
n.r = g
n.x = h
n.q = h
assert i.y.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.v: B = None
        self.r: E = None
        self.x: C = None
        self.q: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

d = A("d")
e = B("e")
h = C("h")
i = D("i")
g = E("g")
j = F("j")
m = D("m")
f = D("f")
n = A("n")

d.t = j
d.o = e
d.v = e
d.r = g
d.x = h
d.q = h
e.q = h
e.u = j
e.v = d
e.z = d
e.t = g
h.z = g
h.o = g
h.p = g
h.x = d
i.t = f
i.y = h
i.p = j
i.r = j
g.q = h
j.v = g
m.t = i
m.y = h
m.p = j
m.r = j
f.t = m
f.y = h
f.p = j
f.r = j
n.t = j
n.o = e
n.v = e
n.r = g
n.x = h
n.q = h
assert i.y.z.q.txt == "h"