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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.s: C = None
        self.p: G = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: C = None
        self.v: C = None
        self.q: D = None
        self.p: D = None
        self.u: B = None
        self.s: B = None
        self.txt = txt

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

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

d = A("d")
i = B("i")
a = C("a")
l = D("l")
j = E("j")
g = F("g")
c = G("c")
b = D("b")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.s: C = None
        self.p: G = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: C = None
        self.v: C = None
        self.q: D = None
        self.p: D = None
        self.u: B = None
        self.s: B = None
        self.txt = txt

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

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

d = A("d")
i = B("i")
a = C("a")
l = D("l")
j = E("j")
g = F("g")
c = G("c")
b = D("b")

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