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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: H = None
        self.q: D = None
        self.v: F = None
        self.u: E = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.o: H = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: B = None
        self.o: G = None
        self.t: G = None
        self.p: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: H = None
        self.q: D = None
        self.v: F = None
        self.u: E = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.o: H = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: B = None
        self.o: G = None
        self.t: G = None
        self.p: F = None
        self.y: D = None
        self.txt = txt

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

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

a.t = m
j.r = i
j.v = i
j.t = f
j.q = e
j.u = m
j.p = k
l.w = j
l.v = f
l.o = f
l.s = m
e.z = a
e.s = i
m.v = f
i.t = f
k.w = e
k.y = e
k.q = c
k.o = h
k.t = h
k.p = i
f.r = i
c.r = i
c.v = i
c.t = f
c.q = e
c.u = m
c.p = k
h.w = e
h.y = e
h.q = c
h.o = k
h.t = k
h.p = i
assert h.p.t.r.t.txt == "f"