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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: H = None
        self.s: G = None
        self.o: G = None
        self.r: E = None
        self.z: H = None
        self.y: H = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.q: H = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: I = None
        self.q: A = None
        self.w: F = None
        self.y: F = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: G = None
        self.txt = txt

l = A("l")
h = B("h")
n = C("n")
d = D("d")
g = E("g")
i = F("i")
c = G("c")
m = H("m")
e = I("e")

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: H = None
        self.s: G = None
        self.o: G = None
        self.r: E = None
        self.z: H = None
        self.y: H = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.q: H = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: I = None
        self.q: A = None
        self.w: F = None
        self.y: F = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: G = None
        self.txt = txt

l = A("l")
h = B("h")
n = C("n")
d = D("d")
g = E("g")
i = F("i")
c = G("c")
m = H("m")
e = I("e")

l.y = e
l.r = e
l.u = d
l.v = d
h.y = e
h.s = d
h.x = n
h.r = m
h.v = m
h.z = l
h.q = l
n.w = h
d.t = e
g.v = d
g.t = h
g.p = e
g.x = e
g.y = l
i.u = e
i.q = m
i.z = m
i.y = m
i.s = c
i.o = c
i.r = g
i.p = h
c.z = m
c.q = m
c.r = d
c.x = e
m.v = e
m.x = e
m.o = e
m.q = l
m.w = i
m.y = i
e.x = g
e.y = c
assert l.y.x.y.v.t.x.txt == "g"