class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: H = None
        self.o: F = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: D = None
        self.t: B = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: G = None
        self.v: E = None
        self.o: A = None
        self.r: G = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

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

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

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

h.o = m
m.r = j
d.q = m
d.u = i
d.o = j
d.w = e
c.x = m
b.p = i
b.y = c
b.t = m
b.u = d
j.u = c
j.y = e
j.v = b
j.o = h
j.r = a
j.w = m
j.q = d
e.w = b
e.t = c
e.z = c
e.r = a
e.o = j
i.r = c
a.w = b
a.t = c
a.z = c
a.r = e
a.o = j
g.o = m
assert e.w.u.u.r.x.r.o.o.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: H = None
        self.o: F = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: D = None
        self.t: B = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: G = None
        self.v: E = None
        self.o: A = None
        self.r: G = None
        self.w: B = None
        self.q: C = None
        self.txt = txt

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

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

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

h.o = m
m.r = j
d.q = m
d.u = i
d.o = j
d.w = e
c.x = m
b.p = i
b.y = c
b.t = m
b.u = d
j.u = c
j.y = e
j.v = b
j.o = h
j.r = a
j.w = m
j.q = d
e.w = b
e.t = c
e.z = c
e.r = a
e.o = j
i.r = c
a.w = b
a.t = c
a.z = c
a.r = e
a.o = j
g.o = m
assert e.w.u.u.r.x.r.o.o.r.v.txt == "b"