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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: I = None
        self.r: A = None
        self.y: G = None
        self.t: G = None
        self.v: A = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.v: I = None
        self.r: G = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: E = None
        self.s: B = None
        self.x: I = None
        self.q: C = None
        self.p: A = None
        self.o: I = None
        self.w: E = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: B = None
        self.o: I = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: E = None
        self.p: F = None
        self.u: A = None
        self.x: A = None
        self.v: D = None
        self.y: D = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: I = None
        self.r: A = None
        self.y: G = None
        self.t: G = None
        self.v: A = None
        self.s: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.v: I = None
        self.r: G = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: E = None
        self.s: B = None
        self.x: I = None
        self.q: C = None
        self.p: A = None
        self.o: I = None
        self.w: E = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: B = None
        self.o: I = None
        self.x: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: E = None
        self.p: F = None
        self.u: A = None
        self.x: A = None
        self.v: D = None
        self.y: D = None
        self.w: F = None
        self.txt = txt

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

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