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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: G = None
        self.s: H = None
        self.y: F = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: D = None
        self.y: F = None
        self.o: F = None
        self.s: H = None
        self.q: C = None
        self.v: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

e = A("e")
g = B("g")
b = C("b")
m = D("m")
d = E("d")
n = F("n")
k = G("k")
j = H("j")
i = H("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: G = None
        self.s: H = None
        self.y: F = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: D = None
        self.y: F = None
        self.o: F = None
        self.s: H = None
        self.q: C = None
        self.v: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

e = A("e")
g = B("g")
b = C("b")
m = D("m")
d = E("d")
n = F("n")
k = G("k")
j = H("j")
i = H("i")

e.o = g
e.s = i
e.p = b
g.w = n
g.x = j
g.q = m
b.q = i
b.u = k
b.p = g
m.w = g
m.q = k
m.s = j
m.y = n
m.r = d
m.t = d
d.q = k
d.z = m
n.u = d
n.z = e
k.r = e
k.v = e
k.t = m
k.y = n
k.o = n
k.s = j
k.q = b
k.z = d
j.y = b
i.y = b
assert k.o.z.p.p.txt == "g"