class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.s: H = None
        self.w: E = None
        self.y: E = None
        self.q: G = None
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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