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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

l.q = b
l.s = k
l.p = k
l.u = c
l.v = i
l.y = i
l.w = j
i.x = b
k.w = c
d.w = c
d.x = b
d.s = b
d.u = i
d.t = j
e.u = b
e.q = d
b.z = j
b.y = c
b.x = d
b.u = k
b.s = i
c.x = l
j.w = c
j.x = b
j.s = b
j.u = i
j.t = d
assert k.w.x.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: C = None
        self.u: G = None
        self.p: C = None
        self.v: B = None
        self.y: B = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

l.q = b
l.s = k
l.p = k
l.u = c
l.v = i
l.y = i
l.w = j
i.x = b
k.w = c
d.w = c
d.x = b
d.s = b
d.u = i
d.t = j
e.u = b
e.q = d
b.z = j
b.y = c
b.x = d
b.u = k
b.s = i
c.x = l
j.w = c
j.x = b
j.s = b
j.u = i
j.t = d
assert k.w.x.w.u.txt == "i"