class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: I = None
        self.x: C = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.s: H = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.z: E = None
        self.t: E = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.u: D = None
        self.s: I = None
        self.w: I = None
        self.t: I = None
        self.y: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: C = None
        self.s: H = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.z: E = None
        self.t: E = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.u: D = None
        self.s: I = None
        self.w: I = None
        self.t: I = None
        self.y: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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