class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: G = None
        self.t: G = None
        self.w: H = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: G = None
        self.w: E = None
        self.x: D = None
        self.z: E = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: C = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.txt = txt

l = A("l")
e = B("e")
f = C("f")
b = D("b")
d = E("d")
a = F("a")
h = G("h")
j = H("j")
n = H("n")
m = D("m")

l.y = d
l.r = h
l.t = h
l.w = j
l.q = f
e.t = l
e.v = a
e.x = a
e.z = a
e.y = a
e.o = d
e.s = d
e.u = f
f.r = a
b.r = d
b.w = d
b.z = d
b.s = d
b.p = h
b.x = m
d.t = b
d.o = h
d.w = a
a.z = h
a.v = e
a.t = d
h.x = d
h.s = f
h.o = l
h.y = l
j.y = f
j.r = h
n.y = f
n.r = h
m.r = d
m.w = d
m.z = d
m.s = d
m.p = h
m.x = b
assert j.y.r.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: G = None
        self.t: G = None
        self.w: H = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: G = None
        self.w: E = None
        self.x: D = None
        self.z: E = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: C = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.txt = txt

l = A("l")
e = B("e")
f = C("f")
b = D("b")
d = E("d")
a = F("a")
h = G("h")
j = H("j")
n = H("n")
m = D("m")

l.y = d
l.r = h
l.t = h
l.w = j
l.q = f
e.t = l
e.v = a
e.x = a
e.z = a
e.y = a
e.o = d
e.s = d
e.u = f
f.r = a
b.r = d
b.w = d
b.z = d
b.s = d
b.p = h
b.x = m
d.t = b
d.o = h
d.w = a
a.z = h
a.v = e
a.t = d
h.x = d
h.s = f
h.o = l
h.y = l
j.y = f
j.r = h
n.y = f
n.r = h
m.r = d
m.w = d
m.z = d
m.s = d
m.p = h
m.x = b
assert j.y.r.t.o.txt == "h"