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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: A = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: D = None
        self.o: H = None
        self.y: A = None
        self.x: B = None
        self.s: D = None
        self.v: E = None
        self.p: H = 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.u: C = None
        self.z: A = None
        self.x: F = None
        self.s: A = None
        self.q: H = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: H = None
        self.v: B = None
        self.r: H = None
        self.p: D = None
        self.q: A = None
        self.u: H = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: A = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: D = None
        self.o: H = None
        self.y: A = None
        self.x: B = None
        self.s: D = None
        self.v: E = None
        self.p: H = 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.u: C = None
        self.z: A = None
        self.x: F = None
        self.s: A = None
        self.q: H = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: H = None
        self.v: B = None
        self.r: H = None
        self.p: D = None
        self.q: A = None
        self.u: H = None
        self.z: D = None
        self.txt = txt

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

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

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

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