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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: G = None
        self.q: A = None
        self.x: B = None
        self.s: G = None
        self.t: E = None
        self.v: G = None
        self.r: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: G = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: G = None
        self.z: D = None
        self.r: E = None
        self.y: D = None
        self.w: C = None
        self.t: B = None
        self.txt = txt

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

d.r = i
d.y = c
d.w = k
j.y = b
f.s = c
f.u = k
f.p = k
i.z = d
i.q = d
i.w = l
i.s = l
i.v = l
i.x = j
i.t = e
i.r = b
e.q = k
e.o = f
k.t = i
k.q = j
k.s = d
l.y = d
b.z = c
b.s = l
b.u = j
b.x = i
c.q = i
c.z = i
c.y = i
c.u = l
c.r = e
c.w = f
c.t = j
m.s = c
m.u = k
m.p = k
assert f.p.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: I = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: G = None
        self.q: A = None
        self.x: B = None
        self.s: G = None
        self.t: E = None
        self.v: G = None
        self.r: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: G = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: G = None
        self.z: D = None
        self.r: E = None
        self.y: D = None
        self.w: C = None
        self.t: B = None
        self.txt = txt

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

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