class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: H = None
        self.t: C = None
        self.u: E = None
        self.o: C = None
        self.p: F = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: F = None
        self.x: F = None
        self.t: D = None
        self.z: A = None
        self.y: I = None
        self.s: I = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: E = None
        self.q: I = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: A = None
        self.p: I = None
        self.x: D = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: G = None
        self.y: B = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: F = None
        self.v: C = None
        self.z: A = None
        self.w: G = None
        self.p: E = None
        self.txt = txt

g = A("g")
c = B("c")
d = C("d")
n = D("n")
h = E("h")
k = F("k")
f = G("f")
b = H("b")
e = I("e")

g.r = b
g.q = b
g.t = d
g.o = d
g.u = h
g.p = k
g.z = e
c.u = h
c.p = k
c.x = k
c.t = n
c.z = g
c.y = e
c.s = e
c.q = f
d.o = e
d.q = e
d.w = h
d.u = h
n.s = g
h.p = n
h.o = g
h.s = b
k.r = b
k.w = g
k.p = e
k.x = n
k.q = n
f.x = d
f.p = c
b.q = g
b.o = f
b.y = c
b.x = d
b.z = k
e.u = h
e.p = h
e.x = k
e.v = d
e.z = g
e.w = f
assert c.s.w.p.t.s.u.p.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: H = None
        self.t: C = None
        self.u: E = None
        self.o: C = None
        self.p: F = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: F = None
        self.x: F = None
        self.t: D = None
        self.z: A = None
        self.y: I = None
        self.s: I = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: E = None
        self.q: I = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: A = None
        self.p: I = None
        self.x: D = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: G = None
        self.y: B = None
        self.x: C = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: F = None
        self.v: C = None
        self.z: A = None
        self.w: G = None
        self.p: E = None
        self.txt = txt

g = A("g")
c = B("c")
d = C("d")
n = D("n")
h = E("h")
k = F("k")
f = G("f")
b = H("b")
e = I("e")

g.r = b
g.q = b
g.t = d
g.o = d
g.u = h
g.p = k
g.z = e
c.u = h
c.p = k
c.x = k
c.t = n
c.z = g
c.y = e
c.s = e
c.q = f
d.o = e
d.q = e
d.w = h
d.u = h
n.s = g
h.p = n
h.o = g
h.s = b
k.r = b
k.w = g
k.p = e
k.x = n
k.q = n
f.x = d
f.p = c
b.q = g
b.o = f
b.y = c
b.x = d
b.z = k
e.u = h
e.p = h
e.x = k
e.v = d
e.z = g
e.w = f
assert c.s.w.p.t.s.u.p.s.u.txt == "h"