class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: I = None
        self.s: A = None
        self.r: E = None
        self.p: E = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: G = None
        self.p: D = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: I = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.p: I = None
        self.w: C = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: C = None
        self.x: B = None
        self.p: B = None
        self.s: B = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: I = None
        self.s: A = None
        self.r: E = None
        self.p: E = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: G = None
        self.p: D = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: I = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.p: I = None
        self.w: C = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: C = None
        self.x: B = None
        self.p: B = None
        self.s: B = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

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

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

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