class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: F = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.y: A = None
        self.w: H = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.x: B = None
        self.s: C = None
        self.y: C = None
        self.t: G = None
        self.w: D = None
        self.r: J = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: D = None
        self.r: B = None
        self.t: C = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

b = A("b")
l = B("l")
c = C("c")
f = D("f")
h = E("h")
i = F("i")
k = G("k")
d = H("d")
a = I("a")
g = J("g")

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: F = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: H = None
        self.y: A = None
        self.w: H = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.x: B = None
        self.s: C = None
        self.y: C = None
        self.t: G = None
        self.w: D = None
        self.r: J = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: D = None
        self.r: B = None
        self.t: C = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

b = A("b")
l = B("l")
c = C("c")
f = D("f")
h = E("h")
i = F("i")
k = G("k")
d = H("d")
a = I("a")
g = J("g")

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