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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.w: G = None
        self.v: A = None
        self.o: B = None
        self.r: G = None
        self.x: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: H = None
        self.w: G = None
        self.v: A = None
        self.o: B = None
        self.r: G = None
        self.x: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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