class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: H = None
        self.z: D = None
        self.t: D = None
        self.p: E = None
        self.q: E = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: B = None
        self.x: I = None
        self.s: B = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: E = None
        self.z: C = None
        self.x: D = None
        self.txt = txt

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

k.r = c
k.p = c
k.v = h
k.z = j
k.t = j
k.q = d
k.u = a
b.y = h
b.u = k
l.r = k
l.v = k
l.x = k
l.o = d
l.q = j
l.t = m
l.z = e
j.v = k
j.o = l
c.v = d
m.x = l
m.y = b
m.p = j
a.p = b
a.t = d
h.y = c
h.r = b
h.s = b
h.x = e
h.u = l
e.s = l
e.z = l
e.y = d
e.x = j
d.v = c
assert k.u.p.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: H = None
        self.z: D = None
        self.t: D = None
        self.p: E = None
        self.q: E = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: B = None
        self.x: I = None
        self.s: B = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: E = None
        self.z: C = None
        self.x: D = None
        self.txt = txt

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

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