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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.q: H = None
        self.z: G = None
        self.u: G = None
        self.o: A = None
        self.t: F = None
        self.r: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: B = None
        self.o: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.y: C = None
        self.z: H = None
        self.o: B = None
        self.r: H = None
        self.s: C = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.q: H = None
        self.z: G = None
        self.u: G = None
        self.o: A = None
        self.t: F = None
        self.r: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: B = None
        self.o: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: A = None
        self.y: C = None
        self.z: H = None
        self.o: B = None
        self.r: H = None
        self.s: C = None
        self.q: G = None
        self.txt = txt

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

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