class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: C = None
        self.v: D = None
        self.o: G = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: B = None
        self.w: B = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.u: D = None
        self.o: A = None
        self.txt = txt

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

b = A("b")
c = B("c")
f = C("f")
l = D("l")
j = E("j")
m = F("m")
g = G("g")
k = A("k")
h = F("h")

b.s = j
b.z = f
b.w = f
b.v = l
b.o = g
c.p = l
f.x = g
f.t = c
f.w = c
f.z = m
f.u = j
l.v = b
l.p = g
l.s = g
j.t = c
j.w = l
j.p = f
m.q = g
m.z = l
m.u = l
m.o = k
g.u = b
g.o = c
k.s = j
k.z = f
k.w = f
k.v = l
k.o = g
h.q = g
h.z = l
h.u = l
h.o = b
assert h.u.v.s.w.s.u.z.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: C = None
        self.v: D = None
        self.o: G = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: B = None
        self.w: B = None
        self.z: F = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.u: D = None
        self.o: A = None
        self.txt = txt

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

b = A("b")
c = B("c")
f = C("f")
l = D("l")
j = E("j")
m = F("m")
g = G("g")
k = A("k")
h = F("h")

b.s = j
b.z = f
b.w = f
b.v = l
b.o = g
c.p = l
f.x = g
f.t = c
f.w = c
f.z = m
f.u = j
l.v = b
l.p = g
l.s = g
j.t = c
j.w = l
j.p = f
m.q = g
m.z = l
m.u = l
m.o = k
g.u = b
g.o = c
k.s = j
k.z = f
k.w = f
k.v = l
k.o = g
h.q = g
h.z = l
h.u = l
h.o = b
assert h.u.v.s.w.s.u.z.u.txt == "j"