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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.p: E = None
        self.s: G = None
        self.q: C = None
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: I = None
        self.s: F = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.p: E = None
        self.s: G = None
        self.q: C = None
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: I = None
        self.s: F = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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