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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: E = None
        self.s: F = None
        self.q: F = None
        self.w: G = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: E = None
        self.s: F = None
        self.q: F = None
        self.w: G = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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