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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.x: H = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.w: D = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

j = A("j")
m = B("m")
n = C("n")
b = D("b")
g = E("g")
l = F("l")
h = G("h")
i = H("i")

j.y = i
j.r = i
j.w = h
j.s = n
m.o = g
m.y = b
n.r = h
b.r = h
b.q = h
b.x = i
b.o = l
g.x = n
l.r = h
l.q = h
l.w = b
l.z = n
h.t = j
h.y = g
h.s = i
h.w = n
h.p = n
i.s = m
assert i.s.o.x.r.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: G = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.x: H = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.w: D = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

j = A("j")
m = B("m")
n = C("n")
b = D("b")
g = E("g")
l = F("l")
h = G("h")
i = H("i")

j.y = i
j.r = i
j.w = h
j.s = n
m.o = g
m.y = b
n.r = h
b.r = h
b.q = h
b.x = i
b.o = l
g.x = n
l.r = h
l.q = h
l.w = b
l.z = n
h.t = j
h.y = g
h.s = i
h.w = n
h.p = n
i.s = m
assert i.s.o.x.r.p.r.txt == "h"